NC114 旋转字符串
import java.util.;

public class Solution {
    
      代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
      旋转字符串
      @param A string字符串
      @param B string字符串
      @return bool布尔型
     
    public boolean solve (String A, String B) {
         write code here
        if (A == null  B == null  A.length() != B.length()) {
            return false;
        }
        StringBuilder str = new StringBuilder();
        str.append(A);
        str.append(A);
        A = str.toString();
        int lenA = A.length();
        int lenB = B.length();
        for (int i = 0; i  lenB; i++) {
            if (B.equals(A.substring(i, i+lenB))) {
                return true;
            }
        }
        return false;
    }
}


